package com.spring.Service.Interface;

import com.spring.Entity.ContractEntity;
import jxl.read.biff.BiffException;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.sql.Date;
import java.text.ParseException;
import java.util.Map;

/**
 * Created by Arabira on 2016/8/4.
 */
public interface ContractService {
    int addContract(ContractEntity contractEntity, String userId);

    String addByExcel(MultipartFile file) throws IOException, BiffException, ParseException;

    int updateContract(String contractId, String contractName, Date startTime, Date deadline, Date remindTime, Integer times,Boolean warn);

    Map<String, Object> onOrOff(String contractId);

    Map<String, Object> findContractByUserId(String userId, Integer pageNum, Integer pageSize);

    ContractEntity findContractById(String contractId);

    ContractEntity[] findContractByRemindTime();
    int  deleteContract (String contractId);

    //    Map<String,Object> findContractAll(Integer pageNum, Integer pageSize);
    Map<String, Object> findContractAll();

    Map<String, Object> findReqContractByAdmin(String contractId, String contractName, String userName, String startS, String startE, String deadlineS, String deadlineE);
}
